package com.soundShape.mediators.administration.customer
{
	
	import com.soundShape.mediators.AbstractViewMediator;
	import com.soundShape.views.administration.Administration;
	import com.soundShape.views.administration.customer.Customers;
	import com.soundShape.vo.CustomerVO;
	
	import mx.collections.ArrayCollection;
	
	import nz.co.codec.flexorm.criteria.Criteria;
	
	
	
	
	public class CustomerMediator extends AbstractViewMediator
	{
		
	
		
				
				public function CustomerMediator()
				{
					super(Customers);
				}
				
				/**
				 * Since the AbstractViewMediator sets the view via Autowiring in Swiz,
				 * we need to create a local getter to access the underlying, expected view
				 * class type.
				 */
				public function get view():Customers
				{
					return this._view as Customers;
				}
				
				/**
				 * The <code>init()</code> method is fired off automatically by the 
				 * AbstractViewMediator when the creation complete event fires for the
				 * corresponding ViewMediator's view. This allows us to listen for events
				 * and set data bindings on the view with the confidence that our view
				 * and all of it's child views have been created and live on the stage.
				 */
				override protected function init():void
				{
					super.init();
					
					this.setViews();
					
				}
				
				override protected function setViewDataBindings():void
				{
					super.setViewDataBindings();
					
					
				}	
				
				override protected function setViewListeners():void
				{
					super.setViewListeners();
					
					
					
				}
				
				private function setViews():void
				{
					var criteria:Criteria = applicationModel.entityManager.createCriteria(CustomerVO);
					
					var customers:ArrayCollection = this.applicationModel.entityManager.fetchCriteria(criteria);
					
					
				}
				
				
				/**
				 * *******************************************************************************
				 * Handlers
				 * *******************************************************************************
				 */
				
				
				/**
				 * *******************************************************************************
				 * Swiz EventHanders
				 * *******************************************************************************
				 */
				
				
				
				
				
				
			
		}
		
	}
